package com.hzqy.persistence.dao.epg;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.epg.AcUserBillVo;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Repository;

@Repository
public class AcUserBillDao extends PersistenceDao<AcUserBillVo, Integer> {
    public int updateUserBillStatus(AcUserBillVo aub) {
        return getSqlSession().update(this.getNamespace() + "updateUserBillStatus",aub);
    }
    public int selectByServiceId(String f_aub_serverid,int f_aub_productid) {
    	Map<String, Object> map = new HashMap<String, Object>();
		map.put("f_aub_serverid", f_aub_serverid);
		map.put("f_aub_productid", f_aub_productid);
        return getSqlSession().selectOne(this.getNamespace() + "selectByServiceId",map);
    }
    public AcUserBillVo selectUserBill(AcUserBillVo aub) {
        return getSqlSession().selectOne(this.getNamespace() + "selectUserBill",aub);
    }
    public int updateAcUserBill(String f_awl_serverid, int f_awl_activityid,String type) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("f_aub_serverid", f_awl_serverid);
		map.put("f_aub_productid", f_awl_activityid);
		map.put("f_aub_type", type);
		return getSqlSession().update(this.getNamespace() + "updateAcUserBill", map);
	}
	public int insertUserBill(AcUserBillVo aub) {
		return getSqlSession().insert(this.getNamespace() + "insertUserBill", aub);
	}
}
